<?php include "classes.inc" ?>
<?php include "constants.inc" ?>
<?php session_start(); ?>
<?php
    if ( isset($_SESSION['user']) == true && isset($_GET['club_id']) == true &&  $_SESSION['user']->club_id == 100 ) {
        $clubId = $_GET['club_id'];
    	$connect = mysql_connect("localhost", DB_USER, DB_PWD);
		mysql_select_db(DB_CATALOG);
	    $query = sprintf("DELETE FROM club WHERE club_id = %u", $clubId);
	    $result = mysql_query($query, $connect);
    }

    redirect("/clubs/clubs.php");
?>